/**
 * openHAB, the open Home Automation Bus.
 * Copyright (C) 2011, openHAB.org <admin@openhab.org>
 *
 * See the contributors.txt file in the distribution for a
 * full listing of individual contributors.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses>.
 *
 * Additional permission under GNU GPL version 3 section 7
 *
 * If you modify this Program, or any covered work, by linking or
 * combining it with Eclipse (or a modified version of that library),
 * containing parts covered by the terms of the Eclipse Public License
 * (EPL), the licensors of this Program grant you additional permission
 * to convey the resulting work.
 */

/*
* generated by Xtext
*/
package org.openhab.model.parseTreeConstruction;

import org.eclipse.emf.ecore.*;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parsetree.reconstr.IEObjectConsumer;
import org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor;

import org.openhab.model.services.SitemapGrammarAccess;

import com.google.inject.Inject;

@SuppressWarnings("all")
public class SitemapParsetreeConstructor extends AbstractParseTreeConstructor {
		
	@Inject
	private SitemapGrammarAccess grammarAccess;
	
	@Override
	protected AbstractToken getRootToken(IEObjectConsumer inst) {
		return new ThisRootNode(inst);	
	}
	
protected class ThisRootNode extends RootToken {
	public ThisRootNode(IEObjectConsumer inst) {
		super(inst);
	}
	
	@Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SitemapModel_Group(this, this, 0, inst);
			case 1: return new Sitemap_Group(this, this, 1, inst);
			case 2: return new Widget_Alternatives(this, this, 2, inst);
			case 3: return new LinkableWidget_Group(this, this, 3, inst);
			case 4: return new Frame_Group(this, this, 4, inst);
			case 5: return new Text_Group(this, this, 5, inst);
			case 6: return new Group_Group(this, this, 6, inst);
			case 7: return new Image_Group(this, this, 7, inst);
			case 8: return new Switch_Group(this, this, 8, inst);
			case 9: return new Selection_Group(this, this, 9, inst);
			case 10: return new List_Group(this, this, 10, inst);
			case 11: return new Mapping_Group(this, this, 11, inst);
			default: return null;
		}	
	}	
}
	

/************ begin Rule SitemapModel ****************
 *
 * SitemapModel:
 * 	"sitemap" Sitemap;
 *
 **/

// "sitemap" Sitemap
protected class SitemapModel_Group extends GroupToken {
	
	public SitemapModel_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapModelAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SitemapModel_SitemapParserRuleCall_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSitemapRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "sitemap"
protected class SitemapModel_SitemapKeyword_0 extends KeywordToken  {
	
	public SitemapModel_SitemapKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSitemapModelAccess().getSitemapKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// Sitemap
protected class SitemapModel_SitemapParserRuleCall_1 extends RuleCallToken {
	
	public SitemapModel_SitemapParserRuleCall_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getSitemapModelAccess().getSitemapParserRuleCall_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(checkForRecursion(Sitemap_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SitemapModel_SitemapKeyword_0(lastRuleCallOrigin, next, actIndex, inst);
			default: return null;
		}	
	}	
}


/************ end Rule SitemapModel ****************/


/************ begin Rule Sitemap ****************
 *
 * Sitemap:
 * 	name=ID ("label=" label=STRING)? ("icon=" icon=STRING)? "{" children+=Widget+ "}";
 *
 **/

// name=ID ("label=" label=STRING)? ("icon=" icon=STRING)? "{" children+=Widget+ "}"
protected class Sitemap_Group extends GroupToken {
	
	public Sitemap_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_RightCurlyBracketKeyword_5(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSitemapRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// name=ID
protected class Sitemap_NameAssignment_0 extends AssignmentToken  {
	
	public Sitemap_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getNameAssignment_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSitemapAccess().getNameIDTerminalRuleCall_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getNameIDTerminalRuleCall_0_0();
			return obj;
		}
		return null;
	}

}

// ("label=" label=STRING)?
protected class Sitemap_Group_1 extends GroupToken {
	
	public Sitemap_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_LabelAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "label="
protected class Sitemap_LabelKeyword_1_0 extends KeywordToken  {
	
	public Sitemap_LabelKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSitemapAccess().getLabelKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_NameAssignment_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// label=STRING
protected class Sitemap_LabelAssignment_1_1 extends AssignmentToken  {
	
	public Sitemap_LabelAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getLabelAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_LabelKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSitemapAccess().getLabelSTRINGTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getLabelSTRINGTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=STRING)?
protected class Sitemap_Group_2 extends GroupToken {
	
	public Sitemap_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSitemapAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_IconAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "icon="
protected class Sitemap_IconKeyword_2_0 extends KeywordToken  {
	
	public Sitemap_IconKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSitemapAccess().getIconKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_Group_1(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Sitemap_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// icon=STRING
protected class Sitemap_IconAssignment_2_1 extends AssignmentToken  {
	
	public Sitemap_IconAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getIconAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_IconKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSitemapAccess().getIconSTRINGTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSitemapAccess().getIconSTRINGTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}


// "{"
protected class Sitemap_LeftCurlyBracketKeyword_3 extends KeywordToken  {
	
	public Sitemap_LeftCurlyBracketKeyword_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSitemapAccess().getLeftCurlyBracketKeyword_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Sitemap_Group_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Sitemap_NameAssignment_0(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}

// children+=Widget+
protected class Sitemap_ChildrenAssignment_4 extends AssignmentToken  {
	
	public Sitemap_ChildrenAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSitemapAccess().getChildrenAssignment_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("children",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("children");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getWidgetRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSitemapAccess().getChildrenWidgetParserRuleCall_4_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new Sitemap_ChildrenAssignment_4(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new Sitemap_LeftCurlyBracketKeyword_3(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// "}"
protected class Sitemap_RightCurlyBracketKeyword_5 extends KeywordToken  {
	
	public Sitemap_RightCurlyBracketKeyword_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSitemapAccess().getRightCurlyBracketKeyword_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Sitemap_ChildrenAssignment_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


/************ end Rule Sitemap ****************/


/************ begin Rule Widget ****************
 *
 * Widget:
 * 	LinkableWidget | (Switch | Selection | List) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))?;
 *
 **/

// LinkableWidget | (Switch | Selection | List) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))?
protected class Widget_Alternatives extends AlternativesToken {

	public Widget_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getWidgetAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_LinkableWidgetParserRuleCall_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Widget_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// LinkableWidget
protected class Widget_LinkableWidgetParserRuleCall_0 extends RuleCallToken {
	
	public Widget_LinkableWidgetParserRuleCall_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getLinkableWidgetParserRuleCall_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(LinkableWidget_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// (Switch | Selection | List) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))?
protected class Widget_Group_1 extends GroupToken {
	
	public Widget_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getWidgetAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_Group_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Widget_Group_1_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Widget_Alternatives_1_0(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// Switch | Selection | List
protected class Widget_Alternatives_1_0 extends AlternativesToken {

	public Widget_Alternatives_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getWidgetAccess().getAlternatives_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_SwitchParserRuleCall_1_0_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Widget_SelectionParserRuleCall_1_0_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Widget_ListParserRuleCall_1_0_2(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}

// Switch
protected class Widget_SwitchParserRuleCall_1_0_0 extends RuleCallToken {
	
	public Widget_SwitchParserRuleCall_1_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getSwitchParserRuleCall_1_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Switch_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// Selection
protected class Widget_SelectionParserRuleCall_1_0_1 extends RuleCallToken {
	
	public Widget_SelectionParserRuleCall_1_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getSelectionParserRuleCall_1_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Selection_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// List
protected class Widget_ListParserRuleCall_1_0_2 extends RuleCallToken {
	
	public Widget_ListParserRuleCall_1_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getWidgetAccess().getListParserRuleCall_1_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier())
			return null;
		if(checkForRecursion(List_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}


// ("label=" label=(ID | STRING))?
protected class Widget_Group_1_1 extends GroupToken {
	
	public Widget_Group_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getWidgetAccess().getGroup_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_LabelAssignment_1_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "label="
protected class Widget_LabelKeyword_1_1_0 extends KeywordToken  {
	
	public Widget_LabelKeyword_1_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getWidgetAccess().getLabelKeyword_1_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_Alternatives_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// label=(ID | STRING)
protected class Widget_LabelAssignment_1_1_1 extends AssignmentToken  {
	
	public Widget_LabelAssignment_1_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getWidgetAccess().getLabelAssignment_1_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_LabelKeyword_1_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWidgetAccess().getLabelIDTerminalRuleCall_1_1_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getWidgetAccess().getLabelIDTerminalRuleCall_1_1_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class Widget_Group_1_2 extends GroupToken {
	
	public Widget_Group_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getWidgetAccess().getGroup_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_IconAssignment_1_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "icon="
protected class Widget_IconKeyword_1_2_0 extends KeywordToken  {
	
	public Widget_IconKeyword_1_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getWidgetAccess().getIconKeyword_1_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_Group_1_1(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Widget_Alternatives_1_0(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// icon=(ID | STRING)
protected class Widget_IconAssignment_1_2_1 extends AssignmentToken  {
	
	public Widget_IconAssignment_1_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getWidgetAccess().getIconAssignment_1_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_IconKeyword_1_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWidgetAccess().getIconIDTerminalRuleCall_1_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getWidgetAccess().getIconIDTerminalRuleCall_1_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWidgetAccess().getIconSTRINGTerminalRuleCall_1_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getWidgetAccess().getIconSTRINGTerminalRuleCall_1_2_1_0_1();
			return obj;
		}
		return null;
	}

}




/************ end Rule Widget ****************/


/************ begin Rule LinkableWidget ****************
 *
 * LinkableWidget:
 * 	(Text | Group | Image | Frame) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("{" children+=Widget+
 * 	"}")?;
 *
 **/

// (Text | Group | Image | Frame) ("label=" label=(ID | STRING))? ("icon=" icon=(ID | STRING))? ("{" children+=Widget+
// "}")?
protected class LinkableWidget_Group extends GroupToken {
	
	public LinkableWidget_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Group_3(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_Group_2(lastRuleCallOrigin, this, 1, inst);
			case 2: return new LinkableWidget_Group_1(lastRuleCallOrigin, this, 2, inst);
			case 3: return new LinkableWidget_Alternatives_0(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier() && 
		   getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// Text | Group | Image | Frame
protected class LinkableWidget_Alternatives_0 extends AlternativesToken {

	public LinkableWidget_Alternatives_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getAlternatives_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_TextParserRuleCall_0_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_GroupParserRuleCall_0_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new LinkableWidget_ImageParserRuleCall_0_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new LinkableWidget_FrameParserRuleCall_0_3(lastRuleCallOrigin, this, 3, inst);
			default: return null;
		}	
	}

}

// Text
protected class LinkableWidget_TextParserRuleCall_0_0 extends RuleCallToken {
	
	public LinkableWidget_TextParserRuleCall_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getTextParserRuleCall_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(Text_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// Group
protected class LinkableWidget_GroupParserRuleCall_0_1 extends RuleCallToken {
	
	public LinkableWidget_GroupParserRuleCall_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroupParserRuleCall_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Group_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Group_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// Image
protected class LinkableWidget_ImageParserRuleCall_0_2 extends RuleCallToken {
	
	public LinkableWidget_ImageParserRuleCall_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getImageParserRuleCall_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier())
			return null;
		if(checkForRecursion(Image_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}

// Frame
protected class LinkableWidget_FrameParserRuleCall_0_3 extends RuleCallToken {
	
	public LinkableWidget_FrameParserRuleCall_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public RuleCall getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getFrameParserRuleCall_0_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier())
			return null;
		if(checkForRecursion(Frame_Group.class, eObjectConsumer)) return null;
		return eObjectConsumer;
	}
	
    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
		}	
	}	
}


// ("label=" label=(ID | STRING))?
protected class LinkableWidget_Group_1 extends GroupToken {
	
	public LinkableWidget_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_LabelAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "label="
protected class LinkableWidget_LabelKeyword_1_0 extends KeywordToken  {
	
	public LinkableWidget_LabelKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getLabelKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Alternatives_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// label=(ID | STRING)
protected class LinkableWidget_LabelAssignment_1_1 extends AssignmentToken  {
	
	public LinkableWidget_LabelAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getLabelAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_LabelKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getLabelIDTerminalRuleCall_1_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getLabelIDTerminalRuleCall_1_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getLabelSTRINGTerminalRuleCall_1_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("icon=" icon=(ID | STRING))?
protected class LinkableWidget_Group_2 extends GroupToken {
	
	public LinkableWidget_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_IconAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "icon="
protected class LinkableWidget_IconKeyword_2_0 extends KeywordToken  {
	
	public LinkableWidget_IconKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getIconKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Group_1(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_Alternatives_0(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// icon=(ID | STRING)
protected class LinkableWidget_IconAssignment_2_1 extends AssignmentToken  {
	
	public LinkableWidget_IconAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getIconAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_IconKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("icon",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("icon");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getIconIDTerminalRuleCall_2_1_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getIconIDTerminalRuleCall_2_1_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getLinkableWidgetAccess().getIconSTRINGTerminalRuleCall_2_1_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getLinkableWidgetAccess().getIconSTRINGTerminalRuleCall_2_1_0_1();
			return obj;
		}
		return null;
	}

}


// ("{" children+=Widget+ "}")?
protected class LinkableWidget_Group_3 extends GroupToken {
	
	public LinkableWidget_Group_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getGroup_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_RightCurlyBracketKeyword_3_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "{"
protected class LinkableWidget_LeftCurlyBracketKeyword_3_0 extends KeywordToken  {
	
	public LinkableWidget_LeftCurlyBracketKeyword_3_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getLeftCurlyBracketKeyword_3_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new LinkableWidget_Group_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new LinkableWidget_Alternatives_0(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}

// children+=Widget+
protected class LinkableWidget_ChildrenAssignment_3_1 extends AssignmentToken  {
	
	public LinkableWidget_ChildrenAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getChildrenAssignment_3_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Widget_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("children",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("children");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getWidgetRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getLinkableWidgetAccess().getChildrenWidgetParserRuleCall_3_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new LinkableWidget_ChildrenAssignment_3_1(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new LinkableWidget_LeftCurlyBracketKeyword_3_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// "}"
protected class LinkableWidget_RightCurlyBracketKeyword_3_2 extends KeywordToken  {
	
	public LinkableWidget_RightCurlyBracketKeyword_3_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getLinkableWidgetAccess().getRightCurlyBracketKeyword_3_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new LinkableWidget_ChildrenAssignment_3_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}



/************ end Rule LinkableWidget ****************/


/************ begin Rule Frame ****************
 *
 * Frame:
 * 	"Frame" {Frame} ("item=" item=ID)?;
 *
 **/

// "Frame" {Frame} ("item=" item=ID)?
protected class Frame_Group extends GroupToken {
	
	public Frame_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getFrameAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Frame_FrameAction_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getFrameAccess().getFrameAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Frame"
protected class Frame_FrameKeyword_0 extends KeywordToken  {
	
	public Frame_FrameKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getFrameAccess().getFrameKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// {Frame}
protected class Frame_FrameAction_1 extends ActionToken  {

	public Frame_FrameAction_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Action getGrammarElement() {
		return grammarAccess.getFrameAccess().getFrameAction_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_FrameKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(!eObjectConsumer.isConsumed()) return null;
		return eObjectConsumer;
	}
}

// ("item=" item=ID)?
protected class Frame_Group_2 extends GroupToken {
	
	public Frame_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getFrameAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_ItemAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Frame_ItemKeyword_2_0 extends KeywordToken  {
	
	public Frame_ItemKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getFrameAccess().getItemKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_FrameAction_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Frame_ItemAssignment_2_1 extends AssignmentToken  {
	
	public Frame_ItemAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getFrameAccess().getItemAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Frame_ItemKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getFrameAccess().getItemIDTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getFrameAccess().getItemIDTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Frame ****************/


/************ begin Rule Text ****************
 *
 * Text:
 * 	"Text" {Text} ("item=" item=ID)?;
 *
 **/

// "Text" {Text} ("item=" item=ID)?
protected class Text_Group extends GroupToken {
	
	public Text_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getTextAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Text_TextAction_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getTextAccess().getTextAction_1().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Text"
protected class Text_TextKeyword_0 extends KeywordToken  {
	
	public Text_TextKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getTextAccess().getTextKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// {Text}
protected class Text_TextAction_1 extends ActionToken  {

	public Text_TextAction_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Action getGrammarElement() {
		return grammarAccess.getTextAccess().getTextAction_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_TextKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(!eObjectConsumer.isConsumed()) return null;
		return eObjectConsumer;
	}
}

// ("item=" item=ID)?
protected class Text_Group_2 extends GroupToken {
	
	public Text_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getTextAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_ItemAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Text_ItemKeyword_2_0 extends KeywordToken  {
	
	public Text_ItemKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getTextAccess().getItemKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_TextAction_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Text_ItemAssignment_2_1 extends AssignmentToken  {
	
	public Text_ItemAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getTextAccess().getItemAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Text_ItemKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getTextAccess().getItemIDTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getTextAccess().getItemIDTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Text ****************/


/************ begin Rule Group ****************
 *
 * Group:
 * 	"Group" ("item=" item=ID);
 *
 **/

// "Group" ("item=" item=ID)
protected class Group_Group extends GroupToken {
	
	public Group_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getGroupAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Group_Group_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getGroupRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Group"
protected class Group_GroupKeyword_0 extends KeywordToken  {
	
	public Group_GroupKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getGroupAccess().getGroupKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// "item=" item=ID
protected class Group_Group_1 extends GroupToken {
	
	public Group_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getGroupAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Group_ItemAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Group_ItemKeyword_1_0 extends KeywordToken  {
	
	public Group_ItemKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getGroupAccess().getItemKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Group_GroupKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Group_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Group_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getGroupAccess().getItemAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Group_ItemKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getGroupAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getGroupAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Group ****************/


/************ begin Rule Image ****************
 *
 * Image:
 * 	"Image" ("item=" item=ID)? ("url=" url=STRING);
 *
 **/

// "Image" ("item=" item=ID)? ("url=" url=STRING)
protected class Image_Group extends GroupToken {
	
	public Image_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_Group_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getImageRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Image"
protected class Image_ImageKeyword_0 extends KeywordToken  {
	
	public Image_ImageKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getImageAccess().getImageKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// ("item=" item=ID)?
protected class Image_Group_1 extends GroupToken {
	
	public Image_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_ItemAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Image_ItemKeyword_1_0 extends KeywordToken  {
	
	public Image_ItemKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getImageAccess().getItemKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_ImageKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Image_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Image_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getImageAccess().getItemAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_ItemKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getImageAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getImageAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// "url=" url=STRING
protected class Image_Group_2 extends GroupToken {
	
	public Image_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getImageAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_UrlAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "url="
protected class Image_UrlKeyword_2_0 extends KeywordToken  {
	
	public Image_UrlKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getImageAccess().getUrlKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_Group_1(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Image_ImageKeyword_0(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// url=STRING
protected class Image_UrlAssignment_2_1 extends AssignmentToken  {
	
	public Image_UrlAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getImageAccess().getUrlAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Image_UrlKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("url",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("url");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getImageAccess().getUrlSTRINGTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getImageAccess().getUrlSTRINGTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule Image ****************/


/************ begin Rule Switch ****************
 *
 * Switch:
 * 	"Switch" ("item=" item=ID) ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?;
 *
 **/

// "Switch" ("item=" item=ID) ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Switch_Group extends GroupToken {
	
	public Switch_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Switch_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSwitchRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Switch"
protected class Switch_SwitchKeyword_0 extends KeywordToken  {
	
	public Switch_SwitchKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getSwitchKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// "item=" item=ID
protected class Switch_Group_1 extends GroupToken {
	
	public Switch_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_ItemAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Switch_ItemKeyword_1_0 extends KeywordToken  {
	
	public Switch_ItemKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getItemKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_SwitchKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Switch_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Switch_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getItemAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_ItemKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSwitchAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSwitchAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Switch_Group_2 extends GroupToken {
	
	public Switch_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_RightSquareBracketKeyword_2_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "mappings=["
protected class Switch_MappingsKeyword_2_0 extends KeywordToken  {
	
	public Switch_MappingsKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// mappings+=Mapping
protected class Switch_MappingsAssignment_2_1 extends AssignmentToken  {
	
	public Switch_MappingsAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_2_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new Switch_MappingsKeyword_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// ("," mappings+=Mapping)*
protected class Switch_Group_2_2 extends GroupToken {
	
	public Switch_Group_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSwitchAccess().getGroup_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_MappingsAssignment_2_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ","
protected class Switch_CommaKeyword_2_2_0 extends KeywordToken  {
	
	public Switch_CommaKeyword_2_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getCommaKeyword_2_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group_2_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Switch_MappingsAssignment_2_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// mappings+=Mapping
protected class Switch_MappingsAssignment_2_2_1 extends AssignmentToken  {
	
	public Switch_MappingsAssignment_2_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSwitchAccess().getMappingsAssignment_2_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSwitchAccess().getMappingsMappingParserRuleCall_2_2_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new Switch_CommaKeyword_2_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


// "]"
protected class Switch_RightSquareBracketKeyword_2_3 extends KeywordToken  {
	
	public Switch_RightSquareBracketKeyword_2_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSwitchAccess().getRightSquareBracketKeyword_2_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Switch_Group_2_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Switch_MappingsAssignment_2_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}



/************ end Rule Switch ****************/


/************ begin Rule Selection ****************
 *
 * Selection:
 * 	"Selection" ("item=" item=ID) ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?;
 *
 **/

// "Selection" ("item=" item=ID) ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Selection_Group extends GroupToken {
	
	public Selection_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Selection_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSelectionRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Selection"
protected class Selection_SelectionKeyword_0 extends KeywordToken  {
	
	public Selection_SelectionKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getSelectionKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// "item=" item=ID
protected class Selection_Group_1 extends GroupToken {
	
	public Selection_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_ItemAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class Selection_ItemKeyword_1_0 extends KeywordToken  {
	
	public Selection_ItemKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getItemKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_SelectionKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class Selection_ItemAssignment_1_1 extends AssignmentToken  {
	
	public Selection_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getItemAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_ItemKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSelectionAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSelectionAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// ("mappings=[" mappings+=Mapping ("," mappings+=Mapping)* "]")?
protected class Selection_Group_2 extends GroupToken {
	
	public Selection_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_RightSquareBracketKeyword_2_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "mappings=["
protected class Selection_MappingsKeyword_2_0 extends KeywordToken  {
	
	public Selection_MappingsKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// mappings+=Mapping
protected class Selection_MappingsAssignment_2_1 extends AssignmentToken  {
	
	public Selection_MappingsAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_2_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new Selection_MappingsKeyword_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// ("," mappings+=Mapping)*
protected class Selection_Group_2_2 extends GroupToken {
	
	public Selection_Group_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSelectionAccess().getGroup_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_MappingsAssignment_2_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ","
protected class Selection_CommaKeyword_2_2_0 extends KeywordToken  {
	
	public Selection_CommaKeyword_2_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getCommaKeyword_2_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group_2_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Selection_MappingsAssignment_2_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// mappings+=Mapping
protected class Selection_MappingsAssignment_2_2_1 extends AssignmentToken  {
	
	public Selection_MappingsAssignment_2_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSelectionAccess().getMappingsAssignment_2_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("mappings",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("mappings");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getMappingRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getSelectionAccess().getMappingsMappingParserRuleCall_2_2_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new Selection_CommaKeyword_2_2_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


// "]"
protected class Selection_RightSquareBracketKeyword_2_3 extends KeywordToken  {
	
	public Selection_RightSquareBracketKeyword_2_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSelectionAccess().getRightSquareBracketKeyword_2_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Selection_Group_2_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Selection_MappingsAssignment_2_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}



/************ end Rule Selection ****************/


/************ begin Rule List ****************
 *
 * List:
 * 	"List" ("item=" item=ID) ("separator=" separator=STRING);
 *
 **/

// "List" ("item=" item=ID) ("separator=" separator=STRING)
protected class List_Group extends GroupToken {
	
	public List_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_Group_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getListRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "List"
protected class List_ListKeyword_0 extends KeywordToken  {
	
	public List_ListKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getListAccess().getListKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// "item=" item=ID
protected class List_Group_1 extends GroupToken {
	
	public List_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_ItemAssignment_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "item="
protected class List_ItemKeyword_1_0 extends KeywordToken  {
	
	public List_ItemKeyword_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getListAccess().getItemKeyword_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_ListKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// item=ID
protected class List_ItemAssignment_1_1 extends AssignmentToken  {
	
	public List_ItemAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getItemAssignment_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_ItemKeyword_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("item",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("item");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getItemIDTerminalRuleCall_1_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getItemIDTerminalRuleCall_1_1_0();
			return obj;
		}
		return null;
	}

}


// "separator=" separator=STRING
protected class List_Group_2 extends GroupToken {
	
	public List_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getListAccess().getGroup_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_SeparatorAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "separator="
protected class List_SeparatorKeyword_2_0 extends KeywordToken  {
	
	public List_SeparatorKeyword_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getListAccess().getSeparatorKeyword_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_Group_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// separator=STRING
protected class List_SeparatorAssignment_2_1 extends AssignmentToken  {
	
	public List_SeparatorAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getListAccess().getSeparatorAssignment_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new List_SeparatorKeyword_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("separator",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("separator");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getListAccess().getSeparatorSTRINGTerminalRuleCall_2_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getListAccess().getSeparatorSTRINGTerminalRuleCall_2_1_0();
			return obj;
		}
		return null;
	}

}



/************ end Rule List ****************/


/************ begin Rule Mapping ****************
 *
 * Mapping:
 * 	cmd=(ID | STRING) "=" label=(ID | STRING);
 *
 **/

// cmd=(ID | STRING) "=" label=(ID | STRING)
protected class Mapping_Group extends GroupToken {
	
	public Mapping_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getMappingAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_LabelAssignment_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getMappingRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// cmd=(ID | STRING)
protected class Mapping_CmdAssignment_0 extends AssignmentToken  {
	
	public Mapping_CmdAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getMappingAccess().getCmdAssignment_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("cmd",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("cmd");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getCmdIDTerminalRuleCall_0_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getCmdIDTerminalRuleCall_0_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getCmdSTRINGTerminalRuleCall_0_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getCmdSTRINGTerminalRuleCall_0_0_1();
			return obj;
		}
		return null;
	}

}

// "="
protected class Mapping_EqualsSignKeyword_1 extends KeywordToken  {
	
	public Mapping_EqualsSignKeyword_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getMappingAccess().getEqualsSignKeyword_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_CmdAssignment_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// label=(ID | STRING)
protected class Mapping_LabelAssignment_2 extends AssignmentToken  {
	
	public Mapping_LabelAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getMappingAccess().getLabelAssignment_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Mapping_EqualsSignKeyword_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("label",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("label");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getLabelIDTerminalRuleCall_2_0_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getLabelIDTerminalRuleCall_2_0_0();
			return obj;
		}
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMappingAccess().getLabelSTRINGTerminalRuleCall_2_0_1(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getMappingAccess().getLabelSTRINGTerminalRuleCall_2_0_1();
			return obj;
		}
		return null;
	}

}


/************ end Rule Mapping ****************/

}
